﻿<Window x:Class="AboutWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="{Binding Path=ApplicationTitle,StringFormat=关于 {0}}" Height="410" Width="500" 
    Icon="Images\About_16x16.png" DataContext="{Binding RelativeSource={RelativeSource Self}}" ShowInTaskbar="False" ResizeMode="NoResize" SizeToContent="Manual" WindowStartupLocation="CenterOwner">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="90" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        
        
        <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Source="Images\iConverterAbout.png" Margin="5" Stretch="Uniform" VerticalAlignment="Top" />

        <Grid    Grid.Row="0" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"  />
                <RowDefinition Height="1*"  />
                <RowDefinition Height="1*"  />
                <RowDefinition Height="1*"  />
                <RowDefinition Height="2*"  />
                <RowDefinition Height="10*"  />
                
            </Grid.RowDefinitions>

            <TextBlock Grid.Row="0" x:Name="txtProductName" Margin="1"   Text="{Binding Path=ProductName}" />
            <TextBlock Grid.Row="1" x:Name="txtVersion"  Margin="1" Text="{Binding Path=Version,  StringFormat=版本 {0}}" />
            <TextBlock Grid.Row="2" x:Name="txbCopyright"  Margin="1" Text="{Binding Path=Copyright}" />
            <TextBlock Grid.Row="3" x:Name="txtCompanyName" Margin="1" Text="{Binding Path=CompanyName}" />
            <TextBox   Grid.Row="4" x:Name="txtDescription"  Margin="3"  Text="{Binding Path=Description, Mode=OneWay}" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" IsReadOnly="True" Background="{x:Null}" BorderBrush="Silver"  />
            <!--<TextBox   Grid.Row="5" x:Name="txtCopyRight"   Margin="3"  Text="{Binding Path=OtherCopyRight, Mode=OneTime}" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" IsReadOnly="True" Background="{x:Null}" />-->
            <FlowDocumentScrollViewer  Grid.Row="5" x:Name="ViewerCopyright" Margin="3" Hyperlink.RequestNavigate="hyperlink_RequestNavigate" Document="{Binding Path=OtherCopyRight, Mode=OneTime}" VerticalScrollBarVisibility="Auto" BorderThickness="1"  BorderBrush="Silver">                
                <!--<FlowDocumentScrollViewer.Document>
                    <FlowDocument >
                        <FlowDocument.Resources>
                            <Style TargetType="{x:Type Paragraph}">
                                <Setter Property="Margin" Value="0"/>
                            </Style>
                        </FlowDocument.Resources>
                        <Paragraph>
                            <Run>本软件使用以下组件</Run>
                        </Paragraph>

                        <List>
                            <ListItem>
                                <Paragraph>
                                    <Hyperlink NavigateUri="http://fluent.codeplex.com/" >
                                        <Run>Fluent Ribbon Control Suite</Run>
                                    </Hyperlink>
                                </Paragraph>
                            </ListItem>
                        </List>
                    </FlowDocument>
                </FlowDocumentScrollViewer.Document>-->
            </FlowDocumentScrollViewer>
        </Grid>
        
        <Button x:Name="btnOK"  Grid.Row="1" Grid.Column="1" Content="确定"   Margin="3,3,10,3" Width="120" HorizontalAlignment="Right" IsDefault="True" IsCancel="True" />
    </Grid>
</Window>
